package org.jeecg.modules.meter.iot;

import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.meter.iot.command.IotCommand;
import org.jeecg.modules.meter.iot.command.MeterYuPeiCommand;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;


/**
 * @Description 构造对接平台工厂
 * @Author liurui
 * @Date 2020/12/3 11:02
 * @Version 1.0
 */

@Component
@Slf4j
public class IotPlatformFactory {

    public static final String IOT_PLATE_YUPEI = "yupei";

    @Autowired
    private MeterYuPeiCommand foreignMeterYuPeiService;

    public IotCommand createIotPlatform(String lotType) {
        switch (lotType) {
            case IOT_PLATE_YUPEI:
                return foreignMeterYuPeiService;
            default:
                return foreignMeterYuPeiService;
        }
    }
}
